import baseUrl from './base-url-config'

const { product: prefix } = baseUrl

export default {
  // 方案版本列表
  getSolutionListAPI: {
    url: `${prefix}/edc/builder/project/scheme/version/list`,
    method: 'get',
  },
  // 方案版本新增
  addSolutionListAPI: {
    url: `${prefix}/edc/builder/project/scheme/version/save`,
    method: 'post',
  },
  // 方案版本修改
  updateSolutionListAPI: {
    url: `${prefix}/edc/builder/project/scheme/version/update`,
    method: 'put',
  },
  // 方案删除
  deleteSolutionListAPI: {
    url: `${prefix}/edc/builder/project/scheme/version/delete`,
    method: 'delete',
  },
  // ecrf版本新增
  addEcrfAPI: {
    url: `${prefix}/edc/builder/project/ecrf/version/save`,
    method: 'POST',
  },
  // ecrf版本修改
  updateEcrfAPI: {
    url: `${prefix}/edc/builder/project/ecrf/version/update`,
    method: 'PUT',
  },
  // ecrf版本列表
  getEcrfAPI: {
    url: `${prefix}/edc/builder/project/ecrf/version/list`,
    method: 'GET',
  },
  // ecrf版本删除
  deleteEcrfAPI: {
    url: `${prefix}/edc/builder/project/ecrf/version/delete`,
    method: 'DELETE',
  },
  // dvp版本新增
  addDvpAPI: {
    url: `${prefix}/edc/builder/project/dvp/version/save`,
    method: 'POST',
  },
  // dvp版本修改
  updateDvpAPI: {
    url: `${prefix}/edc/builder/project/dvp/version/update`,
    method: 'PUT',
  },
  // dvp版本修改
  getDvpAPI: {
    url: `${prefix}/edc/builder/project/dvp/version/list`,
    method: 'GET',
  },
  // dvp版本删除
  deleteDvpAPI: {
    url: `${prefix}/edc/builder/project/dvp/version/delete`,
    method: 'DELETE',
  },
  // ecrf版本修改历史按字段查看
  checkECRFVersionWordAPI: {
    url: `${prefix}/edc/builder/project/ecrf/history/listByField`,
    method: 'GET',
  },
  // ecrf版本修改历史按字段查看
  checkECRFVersionBatchAPI: {
    url: `${prefix}/edc/builder/project/ecrf/history/listBatch`,
    method: 'GET',
  },
  // ecrf版本修改历史按批次详情
  checkECRFVersionBatchDetailAPI: {
    url: `${prefix}/edc/builder/project/ecrf/history/getDetailsByGroupId`,
    method: 'GET',
  },

  // 数据库版本列表
  qryProjectDatabaseVersion: {
    url: `${prefix}/edc/builder/database/database/dataList`,
    method: 'GET',
  },

  // 覆盖操作
  coverDatabaseVersion: {
    url: `${prefix}/edc/builder/database/database/dataList`,
    method: 'GET',
  },

  // 复制项目
  copyDatabaseVersionFromOldProject: {
    url: `${prefix}/edc/builder/database/database/copyDatabaseToProject`,
    method: 'post',
    hasLoading: false,
  },

  // 数据库版本列表--不刷新
  qryProjectDatabaseVersionNpLoading: {
    url: `${prefix}/edc/builder/database/database/dataList`,
    method: 'GET',
    hasLoading: false,
  },

  // 发布数据库版本
  publishDatabaseVersion: {
    url: `${prefix}/edc/builder/project/releaseProject`,
    method: 'post',
  },

  // /查询eCRF 列表
  qryECRFDataList: {
    url: `${prefix}/edc/builder/project/ecrf/version/list`,
    method: 'GET',
    hasLoading: false,
  },

  // 回滚数据库版本
  rollbackProjectDatabaseVersion: {
    url: `${prefix}/edc/builder/project/rollbackProjectDatabaseVersion`,
    method: 'GET',
    hasLoading: false,
  },

  // 回滚数据库版本
  cloneProjectDatabaseVersion: {
    url: `${prefix}/edc/builder/database/database/cloneDatabase`,
    method: 'post',
  },
  // 方案版本列表
  qrySolutionListAPI: {
    url: `${prefix}/edc/builder/project/scheme/version/list`,
    method: 'get',
    hasLoading: false,
  },

  // 删除数据库版本接口
  deleteDatabaseVersion: {
    url: `${prefix}/edc/builder/database/database/delete`,
    method: 'delete',
  },

  // 修改数据库方案版本
  editDatabaseSchemeVersion: {
    url: `${prefix}/edc/builder/database/database/updateDatabase`,
    method: 'post',
  },

  // 获取用户的项目角色
  getProjectRoleListByUserAPI: {
    url: `${prefix}/edc/sys/role/getProjectRoleListByUser`,
    method: 'GET',
  },
  // 根据项目id获取不同环境ProjectDatabaseId
  getProjectDatabaseIdAPI: {
    url: `${prefix}/edc/builder/project/getProjectDatabaseId`,
    method: 'GET',
  },
}
